Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add permissions for ELB to create service linked roles #489

Merged

Conversation

randomvariable
Copy link
Member

@randomvariable randomvariable commented Jan 11, 2019

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #422

Permits ELB, as an Amazon-managed service, to create a role to access EC2 in the customer's account, which is needed to attach the control plane instances to a load balancer.

Special notes for your reviewer:

In order to test this, ELB will create a AWSServiceRoleForElasticLoadBalancing using these IAM permissions. If all ELBs are deleted, then this role can be deleted and then the account is reusable for testing this feature.

Release note:

clusterawsadm: IAM policies have been extended to allow AWS ELB to create the AWSServiceRoleForElasticLoadBalancing IAM role if it does not exist in an account.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 11, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: randomvariable

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 11, 2019
Actual AWS IAM policy conditions can be of various types.

Signed-off-by: Naadir Jeewa <jeewan@vmware.com>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 23, 2019
@randomvariable randomvariable changed the title [wip] Add permissions for ELB to create service linked roles Add permissions for ELB to create service linked roles Jan 23, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 23, 2019
@randomvariable
Copy link
Member Author

Ready for review

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor detail, rest lgtm

}

// NewManagedName creates an IAM acceptable name prefixed with this Cluster API
// implementation's prefix.
func NewManagedName(prefix string) string {
return fmt.Sprintf("%s.%s", prefix, IAMSuffix)
}

// ProcessPolicyDocument replaces IAMConditions with Condition to work around
// GoFormation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a little bit more context on why this is needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extended the comment on both that function and the StatementEntry type.

GoFormation processes "Condition" keys as CFN intrinsics.

Renames Condition to IAMConditions until GoFormation supports
IAM properly.

Signed-off-by: Naadir Jeewa <jeewan@vmware.com>
Allow AWS ELB to create its own Service Linked AWS IAM role to be able
to manage instances linked to an ELB.

Signed-off-by: Naadir Jeewa <jeewan@vmware.com>
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2019
@k8s-ci-robot k8s-ci-robot merged commit 6b1875b into kubernetes-sigs:master Jan 24, 2019
@randomvariable randomvariable deleted the iam-aws-new-account-support branch May 26, 2020 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing IAM Rights to create classic load balancer, master waiting to become ready
3 participants